package org.example.myleet.p606;

import org.example.myleet.Utils.Assert;
import org.example.myleet.Utils.Parser;

public class Main {
    public static void main(String[] args) {
        Solution solution = new Solution();
        Assert.isTrue("1(2(4))(3)".equals(solution.tree2str(Parser.parse(new Integer[]{1,2,3,4}))));
        Assert.isTrue("1(2()(4))(3)".equals(solution.tree2str(Parser.parse(new Integer[]{1,2,3,null,4}))));
        Assert.isTrue("1(2()(4()(6)))(3(5))".equals(solution.tree2str(Parser.parse(new Integer[]{1,2,3,null,4,5,null,null,6}))));
    }
}
